home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / graphics / amicad / arexx_english / roundedbox.amicad < prev    next >
Text File  |  1999-12-06  |  934b  |  33 lines

  1. /* Tracé d'une boîte aux coins arrondis */
  2. /* $VER: 1.00e (© R.Florac, 23 mai 1999) */
  3.  
  4. options results     /* indispensable pour récupérer le résultat des macros */
  5.  
  6. signal on error     /* pour l'interception des erreurs */
  7. signal on syntax
  8.  
  9. 'GETZONE("Click in the first corner of the box", "Click in the second corner")'
  10. c=result
  11. if c="" then exit
  12.  
  13. 'ASKNUM("Angles radius?",10)'
  14. angle=result
  15. if angle="" then exit
  16.  
  17. parse var c x0 ',' y0 ',' x1 ',' y1
  18. 'DEF BOXR(X,Y,Z,W,R)=M__=DRAWMODE(-1):GROUP(ARC(X+R,Y+R,R,R,-90,0),DRAW(X+R,Y,Z-R,Y),ARC(Z-R,Y+R,R,R,0,90),DRAW(Z,Y+R,Z,W-R),ARC(Z-R,W-R,R,R,90,180),DRAW(Z-R,W,X+R,W),ARC(X+R,W-R,R,R,180,270),DRAW(X,Y+R,X,W-R)):DRAWMODE(M__)'
  19. 'SAVEALL(-1):BOXR('c','angle')'
  20.  
  21. exit
  22.  
  23. /* Traitement des erreurs, interruption du programme */
  24. syntax:
  25. erreur=RC
  26. 'MESSAGE("Erreur de syntaxe"+CHR(10)+"en ligne 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
  27. exit
  28.  
  29. error:
  30. 'MESSAGE("Erreur en ligne 'SIGL'")'
  31. exit
  32.  
  33.